Raft is a distributed consensus algorithm whose obj ective is to ensure that

every server agrees upon the same series of state transitions and is

equivalent to Paxos in fault tolerance and performance. The basic idea

behind Raft is that: nodes collectively select a leader, others become

followers. The leader is responsible for accepting client requests, state

transition, and managing the replication of the log across followers. The

data flow is from the leader to other servers. The consensus is decomposed

in Raft into three sub-problems: leader election, log replication, and safety.

Each node in Raft exists in one of the three states: leader, follower, or

candidate.

Mechanism of consensus

To achieve the necessary agreement on a single data value or a single state

of the network among distributed processes or multi-agent systems, a fault-

tolerant mechanism is used in computer and blockchain systems, such as

with cryptocurrencies is a consensus mechanism useful in record-keeping,

among other things.

A central administrator in any centralized system, like a database system

holding key information about census data in a country, has the authority to

maintain and update the database. A central authority, who remains the sole

in-charge of maintaining genuine records and the task of making any

updates like adding/ deleting/ updating names of people who qualify for

certain criteria is performed by the authority.

The public blockchains that operate as decentralized, self-regulating

systems work on a global scale without any single authority. Contributions

from hundreds of thousands of participants who work on verification and

authentication of transactions occurring on the blockchain and on the block

mining activities are involved.

To ensure that all the transactions occurring on the network are genuine,

and all participants agree on a consensus on the status of the ledger in such

a dynamically changing status of the blockchain, these publicly shared

ledgers need an efficient, fair, real-time, functional, reliable, and secure

mechanism. The consensus mechanism, which is a set of rules that decides

on the contributions by the various participants of the blockchain, is

performed for this all-important task.